﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ProjectFitus.Models
{
	public class FitusLogger
	{
		private static FitusLogger theInstance = null;
		IDBFitusRepository m_repo = new DBFitusRepository();

		public static FitusLogger Instance
		{
			get
			{
				if (theInstance == null)
				{
					theInstance = new FitusLogger();
				}
				return theInstance;
			}
		}

		public void LogException(Exception ex)
		{
			//Todo skrá error í log
			m_repo.InsertError(
					DateTime.Now,
					ex.Source,
					ex.StackTrace);
		}
	}
}